﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SGRapidForm.Common;
using System.Collections.Specialized;
using FishWebLib;
using SGRapidForm.Permission.Entity;
using System.Data;

namespace SGRapidForm.Permission.Component
{
    public class RoleButtonComponent : ComponentBase
    {
        public bool RoleButton_Add(string roleKeyid, string buttonKeyid)
        {
            return FishBLLHelper.CallSpExecuteNonQuery("sgrf_permission_RoleButton_Add", null, roleKeyid, buttonKeyid) > 0;
        }

        public bool RoleButton_Delete(string roleKeyid, string buttonKeyid)
        {
            return FishBLLHelper.CallSpExecuteNonQuery("sgrf_permission_RoleButton_Delete", null, roleKeyid, buttonKeyid) > 0;
        }

        public List<PermissionDetails> RoleButton_GetDetailsByRoleKeyidAndPageKeyid(string roleKeyid, string pageKeyid)
        {
            return FishBLLHelper.CallSpGetDataItemList<PermissionDetails>("sgrf_permission_RoleButton_GetDetailsByRoleKeyidAndPageKeyid", null, roleKeyid, pageKeyid);
        }
    }
}
